package com.yonyou.brigade.third_parties.fanscar.service;

import com.alibaba.fastjson.JSONObject;
import com.yonyou.brigade.basic_init.model.BriChannel;
import com.yonyou.brigade.third_parties.fanscar.model.FanscarConfig;

import java.util.List;

/**
 * @author houyb
 * @Date: 2019/2/28
 */
public interface IFanscarPublicService {
    /**
     * 向泛嘉国际推送申请单
     *
     * @param channel
     * @param tenant
     * @param orgpk
     * @param applyOrderJson
     * @return
     */
    JSONObject pushApplayOrder(BriChannel channel, String tenant, String orgpk, JSONObject applyOrderJson);

    /**
     * 申请单关闭
     *
     * @param applicationNumber 申请单号
     * @param channel     泛嘉配置信息
     * @return
     */
    List closeApplyOrder(String applicationNumber, BriChannel channel);

    /**
     * 获取Token
     *
     * @param fanscarConfig 配置信息
     * @return String 数据访问token
     * @since : 2019-02-28
     */
    String getToken(FanscarConfig fanscarConfig);

    /**
     * 获取H5跳转Token
     *
     * @param employeeId    创建用户的员工ID
     * @param fanscarConfig 泛嘉开通信息
     * @return String H5跳转token
     * @since : 2019-02-28
     */
    String getH5Token(String employeeId, FanscarConfig fanscarConfig);
}
